package com.atguigu.acl.mapper;

import com.atguigu.acl.entity.Resource;
import com.atguigu.acl.entity.RoleResource;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
 * <p>
 * 角色资源表 Mapper 接口
 * </p>
 *
 * @author smday
 * @since 2020-08-10
 */
public interface RoleResourceMapper extends BaseMapper<RoleResource> {

    /**
     * 根据角色id获取资源列表
     */
    List<Resource> getResourceListByRoleId(Long roleId);

    /**
     * 批量增加role—resource
     */
    int insertList(List<RoleResource> roleResourceList);
}
